package com.ease.platform.model.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.OptionalEnum;

/**
 * 
 * @author nathanleewei
 * 
 */
@Deprecated
public enum ConstraintType implements OptionalEnum {

	Location((short) 1, "Location"),

	EntityType((short) 2, "EntityType"),

	AttributeType((short) 3, "AttributeType"),

	Instance((short) 4, "Instance");

	private short value;

	private String text;

	private ConstraintType(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public static ConstraintType get(short value) {
		return EnumUtil.get(ConstraintType.class, value, Location);
	}

	public static ConstraintType get(String name) {
		return EnumUtil.get(ConstraintType.class, name, Location);
	}

	public String getText() {
		return text;
	}

	public String getName() {
		return name();
	}

	public short getValue() {
		return value;
	}

}
